//////////////////////////////////////////////////////////////////////////////////
//
//	Entity Bugfix
//		- Version 1.0
//		- 07.17.2006
//		- edited: diamond-optic
//
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
// 	- Sometimes you'll get a rare bug where you cant see entities
//	- This re-attaches your view when you respawn and should fix the bug
//
// Changelog:
//
//	- 07.17.2006 Version 1.0
//		Initial Release
//
//////////////////////////////////////////////////////////////////////////////////

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
	register_plugin("Entity Bugfix","1.0","diamond-optic")
	
	register_cvar("amx_entity_bugfix_stats", "1.0", FCVAR_SERVER|FCVAR_SPONLY)
	
	register_event("ResetHUD","respawn_fix","be")
}

public respawn_fix(id)
{
	if (is_user_alive(id) && is_user_connected(id) && !is_user_bot(id))
		engfunc(EngFunc_SetView,id,id)
}
